package com.maserb.monitor.repository.schoolConduct;

import com.maserb.monitor.entity.schoolConduct.StudentConductRecordEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentConductRecordRepository extends JpaSpecificationExecutor<StudentConductRecordEntity>
        , PagingAndSortingRepository<StudentConductRecordEntity, String> {

    @Query(value = "from StudentConductRecordEntity where student.id=?1  order by createTime desc")
    List<StudentConductRecordEntity> findByStudentId(String studentId);

    /*@Query(value = "select StudentConductRecordEntity where ")
    Page<StudentConductRecordEntity> findAll(Pageable pageable, String userId, String name, String studentId, String clazzId, String itemId, String startTime, String endTime);*/
}